package mystudy

import "fmt"
// 接口练习
type AnimalDemo01 interface {
	eat()
}

type Dog02 struct{
	name string
}

func (d Dog02) eat(){
	fmt.Println(d.name,"：开始吃饭了")
}

func test(strall...interface{}){
	fmt.Println(strall)
	for i:=0 ; i < len(strall); i++{
		fmt.Printf("%v,%T----\n", strall[i], strall[i])
	}

}

func DemoStruct02(){
	var d Dog02 = Dog02{"小花"}
	d.eat()
	test(d, 1,23,4,5,"adsf", 'a')
	var b interface{} = 12
	fmt.Println(b)
	fmt.Printf("%T")
	var aa interface{} = 12
	var bb interface{} = "aa"
	var cc interface{} = 'x'
	fmt.Println(aa, bb)
	fmt.Printf("%c", cc)
}